Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /


Figures, Tables, and Listings

Color Plates

Color plates are immediately preceding the title page. Color Plate 1 Blend examples with different operand values

Color Plate 2 Showing color transparency with an alpha channel

Color Plate 3 Applying color by preserving luminance in the destination

Color Plate 4 Color spaces

Preface About This Book xix

Figure P-1 Roadmap to the QuickDraw GX suite of books xx

Chapter 1 Introduction to QuickDraw GX 1-1

Figure 1-1 Several QuickDraw GX objects 1-8

Figure 1-2 A shape object and its referenced objects 1-12

Figure 1-3 Printing objects 1-14

Figure 1-4 Effects of mapping 1-25

Figure 1-5 How QuickDraw GX draws a shape 1-27

Figure 1-6 A rectangle in geometry space 1-29

Figure 1-7 A rectangle in local space (transform mapping applied) 1-30

Figure 1-8 A rectangle in global space (view port mapping applied) 1-31

Figure 1-9 A rectangle in device space (view device mapping applied) 1-32

Figure 1-10 Parts of a line for hit-testing 1-33

Figure 1-11 Dragging a document to a desktop printer icon
on the desktop 1-36

Figure 1-12 Printing a single document that has multiple formats 1-37

Listing 1-1 Sample GraphicsBug heap dump (HD) listing 1-40

Table 1-1 Convenience constants for parameters 1-43

Table 1-2 QuickDraw GX objects 1-45

Figure 1-13 Properties of the basic QuickDraw GX objects 1-49

Chapter 2 Shape Objects 2-1

Figure 2-1 Basic components of a QuickDraw GX shape 2-6

Figure 2-2 The shape object and its properties 2-7

Table 2-1 Shape types 2-9

Figure 2-3 Shape geometry for each type of QuickDraw GX shape 2-12

Table 2-2 Shape fills 2-13

Figure 2-4 Even-odd and winding fills 2-14

Table 2-3 Valid shape fills for each shape type 2-15

Table 2-4 Shape attributes 2-16

Figure 2-5 Shape parts for hit-testing 2-21

Table 2-5 Where to find information on shape-type conversion 2-33

Listing 2-1 Directly accessing a shape's geometry 2-34

Listing 2-2 Hit-testing a line 2-38

Listing 2-3 Flattening a shape 2-39

Listing 2-4 Unflattening a shape 2-40

Listing 2-5 A spool function that parses shape data 2-41

Table 2-6 Shape-related functions described elsewhere 2-42

Chapter 3 Style Objects 3-1

Figure 3-1 The style object and its properties 3-4

Table 3-1 Where to go for information on style object properties and functions 3-6

Listing 3-1 Building a style list by copying a style object 3-9

Table 3-2 Style-related functions described elsewhere 3-14

Chapter 4 Colors and Color-Related Objects 4-1

Figure 4-1 Luminance color space 4-7

Figure 4-2 Storage formats for luminance-based color spaces 4-8

Table 4-1 Luminance-based color spaces supported by QuickDraw GX 4-8

Figure 4-3 RGB color space 4-9

Table 4-2 RGB color spaces supported by QuickDraw GX 4-10

Figure 4-4 Storage formats for RGB color spaces 4-11

Figure 4-5 HSV color space and HLS color space 4-12

Figure 4-6 Storage formats for HSV color spaces 4-13

Table 4-3 HSV and HLS color spaces supported by QuickDraw GX 4-13

Figure 4-7 Colors in CMYK color space 4-14

Figure 4-8 Storage formats for CMYK color spaces 4-15

Table 4-4 CMYK color spaces supported by QuickDraw GX 4-15

Figure 4-9 Yxy chromaticities 4-17

Figure 4-10 Storage formats for XYZ color spaces 4-19

Table 4-5 Universal color spaces supported by QuickDraw GX 4-19

Figure 4-11 The I and Q axes in YIQ color space 4-21

Table 4-6 Video color spaces supported by QuickDraw GX 4-21

Figure 4-12 Storage formats for YIQ color spaces 4-22

Figure 4-13 Storage format for indexed color space 4-23

Table 4-7 Indexed color space supported by QuickDraw GX 4-23

Figure 4-14 Showing color transparency with an alpha channel 4-24

Figure 4-15 Color gamuts for two devices (in Yxy space) 4-28

Figure 4-16 Profile chromaticities for a device (in Yxy space) 4-29

Figure 4-17 A profile response curve for a device 4-29

Figure 4-18 Maintaining lightness and maintaining saturation in color matching 4-31

Figure 4-19 The color set object and its properties 4-33

Figure 4-20 The color profile object and its properties 4-36

Chapter 5 Ink Objects 5-1

Figure 5-1 The ink object and its properties 5-6

Table 5-1 Ink attributes 5-9

Figure 5-2 Arithmetic transfer modes 5-13

Figure 5-3 Blend example with different operand values 5-15

Figure 5-4 Highlight transfer mode 5-16

Figure 5-5 Boolean transfer modes (1-bit depth) 5-17

Figure 5-6 Pseudo-Boolean transfer modes 5-18

Figure 5-7 Alpha-channel transfer modes 5-21

Figure 5-8 Typical modes used to determine result opacity
for the alpha channel 5-23

Figure 5-9 Anti-aliasing 5-25

Figure 5-10 Automatic conversion of color values during a transfer
mode operation 5-26

Figure 5-11 Maximum and minimum color-component values
in RGB space 5-28

Figure 5-12 How minimum and maximum color limits affect drawing 5-29

Figure 5-13 How reversed minimum and maximum color limits
affect drawing 5-29

Figure 5-14 The effects of reversing maximum and minimum
in a color space 5-30

Figure 5-15 The effect of source color limits on drawing 5-31

Figure 5-16 The effect of destination color limits on drawing 5-32

Figure 5-17 The effect of result color limits on drawing 5-33

Figure 5-18 Summary of transfer mode operation 5-37

Figure 5-19 Applying color by preserving luminance in the destination 5-47

Chapter 6 Transform Objects 6-1

Figure 6-1 The transform object and its properties 6-6

Figure 6-2 A transform clip 6-7

Figure 6-3 A framed transform clip 6-8

Figure 6-4 Converting a framed shape with a nonzero pen width into a transform clip 6-8

Figure 6-5 Using a bitmap as a transform clip 6-9

Figure 6-6 Modifying a transform clip by subtracting it from another shape 6-9

Figure 6-7 Effects of the transform mapping 6-10

Table 6-1 Shape parts for hit-testing, from the gxShapeParts enumeration 6-12

Listing 6-1 Creating and disposing of a transform object 6-16

Listing 6-2 Cloning a transform to prevent it from being deleted 6-17

Table 6-2 Constructive geometry operations between transform clips and other shapes 6-21

Figure 6-8 Constructive geometry operations with a polygon clip and a rectangle shape 6-22

Listing 6-3 Modifying a shape's transform with transform-mapping calls only 6-25

Listing 6-4 Modifying a shape's transform with transform-mapping and shape-geometry calls 6-25

Listing 6-5 Modifying a shape's geometry with shape-geometry calls 6-27

Listing 6-6 Getting and setting view ports 6-29

Chapter 7 View-Related Objects 7-1

Figure 7-1 Objects used by the drawing mechanism 7-6

Figure 7-2 View port object properties 7-8

Figure 7-3 Clipping and mapping in view ports 7-10

Table 7-1 Dither levels and patterns 7-11

Figure 7-4 Halftone angle 7-14

Figure 7-5 Halftone frequency 7-15

Figure 7-6 Halftone dot types 7-16

Figure 7-7 Hierarchical view ports in a window 7-18

Figure 7-8 A view port hierarchy 7-19

Table 7-2 View port attributes 7-20

Figure 7-9 View ports in windows 7-22

Figure 7-10 Adjusting a child view port's mapping to handle scrolling 7-23

Figure 7-11 View ports overlapping view devices 7-24

Figure 7-12 View device object properties 7-25

Table 7-3 View device attributes 7-27

Figure 7-13 The QuickDraw GX coordinate plane 7-31

Figure 7-14 A shape geometry and a transform clip geometry 7-32

Figure 7-15 Applying the transform's clip and mapping to a shape 7-33

Figure 7-16 Applying the child view port's mapping and clip to a shape 7-35

Figure 7-17 Applying the parent view port's mapping and clip
to a shape 7-36

Figure 7-18 Applying the view device's mapping and clip to a shape 7-38

Figure 7-19 The shape as finally displayed 7-39

Listing 7-1 Changing a view port's dither, halftone, and attributes 7-42

Listing 7-2 Copying the view ports from one view group to another 7-44

Listing 7-3 Changing a view port's mapping 7-45

Listing 7-4 Setting a view port clip 7-46

Listing 7-5 Setting up a view port for a window 7-47

Listing 7-6 Supporting scrolling in a child view port 7-48

Listing 7-7 Setting a shape color for XOR highlighting 7-49

Listing 7-8 Locating the bounding rectangles of a list of shapes
in a view port 7-51

Listing 7-9 Creating a new view device 7-53

Listing 7-10 Copying the view devices from one view group to another 7-54

Listing 7-11 Returning the mapping from local to device space 7-57

Listing 7-12 Setting up a data structure for offscreen drawing 7-58

Listing 7-13 Setting up a data structure for offscreen drawing 7-61

Listing 7-14 Setting up a view port and view group for offscreen drawing 7-63

Listing 7-15 Returning the characteristics of an offscreen device area 7-64

Chapter 8 Tag Objects 8-1

Figure 8-1 The tag object and its properties 8-4

Table 8-1 Defined tag types for tag objects 8-6

Listing 8-1 Adding data to a shape as a tag object 8-8

Listing 8-2 Retrieving the contents of a tag object 8-10


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996